package com.biz.primus.commodity.enums;

import java.io.Serializable;

public enum GbStatus implements Serializable {


    TO_BE_ENABLE(0, "待启用"), NEW_PRODUCT_TRIAL_SALE(1, "新品试销"), NEW_PRODUCT_EVALUATION(2, "新品评估"), NORMAL(3, "正常"),
    SUSPEND_ORDER(4, "暂停订货"), SEASONAL_TREATMENT(5, "换季处理"), SUSPEND_OPERATION(6, "暂停经营"), STOP_SAIL(7, "停止销售"),
    WAIT_CHECK_AND_RETURN(8, "待清退"), CHECK_AND_RETURN(9, "清退");

    private Integer value;

    private String desc;

    GbStatus(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public static GbStatus valueOf(Integer value) {
        if (value == null) {
            return null;
        }
        switch (value) {
            case 0:
                return TO_BE_ENABLE;
            case 1:
                return NEW_PRODUCT_TRIAL_SALE;
            case 2:
                return NEW_PRODUCT_EVALUATION;
            case 3:
                return NORMAL;
            case 4:
                return SUSPEND_ORDER;
            case 5:
                return SEASONAL_TREATMENT;
            case 6:
                return SUSPEND_OPERATION;
            case 7:
                return STOP_SAIL;
            case 8:
                return WAIT_CHECK_AND_RETURN;
            case 9:
                return CHECK_AND_RETURN;
            default:
                return null;
        }
    }
}
